package com.passion.context;

import com.passion.solr.config.SolrConfig;
import com.passion.solr.service.DemoSolrSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.stereotype.Component;

/**
 * 类描述：检索服务上下文
 *
 * @author ZhuYin
 * @since 2025年01月05日
 */
@ConditionalOnBean(SolrConfig.class)
@Component
public class SolrSearchContext {

    public static DemoSolrSearchService demoSolrSearchService;

    @Autowired(required = false)
    public void setDemoSolrSearchService(DemoSolrSearchService demoSolrSearchService) {
        SolrSearchContext.demoSolrSearchService = demoSolrSearchService;
    }

}
